\select@language {italian}
\contentsline {chapter}{\numberline {1}Introduzione}{4}{chapter.1}
\contentsline {section}{\numberline {1.1}Una panoramica generale.}{5}{section.1.1}
\contentsline {section}{\numberline {1.2}La rete Mini-KaZaA.}{5}{section.1.2}
\contentsline {chapter}{\numberline {2}Bootstrap Server}{6}{chapter.2}
\contentsline {section}{\numberline {2.1}Il Bootstrap server in generale}{6}{section.2.1}
\contentsline {section}{\numberline {2.2}Entriamo nel dettaglio}{6}{section.2.2}
\contentsline {section}{\numberline {2.3}La classe NodeInfo}{7}{section.2.3}
\contentsline {section}{\numberline {2.4}L'interfaccia grafica.}{8}{section.2.4}
\contentsline {chapter}{\numberline {3}Mini-KaZaA Client}{10}{chapter.3}
\contentsline {section}{\numberline {3.1}Mini-KaZaA Client in generale}{10}{section.3.1}
\contentsline {section}{\numberline {3.2}Il codice di Mini-KaZaA client}{10}{section.3.2}
\contentsline {section}{\numberline {3.3}Le strutture dati comuni}{11}{section.3.3}
\contentsline {subsection}{\numberline {3.3.1}NodeConfig.java}{12}{subsection.3.3.1}
\contentsline {subsection}{\numberline {3.3.2}Query.java}{12}{subsection.3.3.2}
\contentsline {subsection}{\numberline {3.3.3}Answer.java}{13}{subsection.3.3.3}
\contentsline {subsection}{\numberline {3.3.4}SearchField.java}{14}{subsection.3.3.4}
\contentsline {subsection}{\numberline {3.3.5}Download.java}{14}{subsection.3.3.5}
\contentsline {subsection}{\numberline {3.3.6}DownloadRequest.java}{15}{subsection.3.3.6}
\contentsline {subsection}{\numberline {3.3.7}DownloadResponse.java}{15}{subsection.3.3.7}
\contentsline {section}{\numberline {3.4}Il percorso di una query}{15}{section.3.4}
\contentsline {section}{\numberline {3.5}La classe SupernodeList.java}{16}{section.3.5}
\contentsline {section}{\numberline {3.6}Il paradigma Observable-Observer}{19}{section.3.6}
\contentsline {section}{\numberline {3.7}Ping dei nodi}{20}{section.3.7}
\contentsline {section}{\numberline {3.8}Invio di file e divisione del file in parti.}{22}{section.3.8}
\contentsline {section}{\numberline {3.9}La grafica del client Mini-KaZaA}{24}{section.3.9}
\contentsline {chapter}{\numberline {4}Ordinary Node}{27}{chapter.4}
\contentsline {section}{\numberline {4.1}Le classi del package ordinarynode}{27}{section.4.1}
\contentsline {subsection}{\numberline {4.1.1}OrdinarynodeFiles.java}{27}{subsection.4.1.1}
\contentsline {subsubsection}{addFiles}{28}{section*.1}
\contentsline {subsubsection}{removeFiles}{28}{section*.2}
\contentsline {subsubsection}{searchFiles}{29}{section*.3}
\contentsline {subsection}{\numberline {4.1.2}OrdinarynodeDownloadMonitor.java}{30}{subsection.4.1.2}
\contentsline {subsection}{\numberline {4.1.3}OrdinarynodeFoundList.java}{31}{subsection.4.1.3}
\contentsline {subsection}{\numberline {4.1.4}OrdinarynodeQuestionList.java}{32}{subsection.4.1.4}
\contentsline {subsection}{\numberline {4.1.5}OrdinarynodeFriendRequest.java}{33}{subsection.4.1.5}
\contentsline {section}{\numberline {4.2}Il cuore di un Ordinary Node}{33}{section.4.2}
\contentsline {subsection}{\numberline {4.2.1}Engine}{34}{subsection.4.2.1}
\contentsline {subsection}{\numberline {4.2.2}ON in ascolto sul socket TCP}{35}{subsection.4.2.2}
\contentsline {subsection}{\numberline {4.2.3}ON e RMI}{37}{subsection.4.2.3}
\contentsline {subsection}{\numberline {4.2.4}Scelta del SN al quale connettersi}{39}{subsection.4.2.4}
\contentsline {subsection}{\numberline {4.2.5}Condivisione di file}{41}{subsection.4.2.5}
\contentsline {chapter}{\numberline {5}Super Node}{42}{chapter.5}
\contentsline {section}{\numberline {5.1}L'interfaccia per le callback}{42}{section.5.1}
\contentsline {section}{\numberline {5.2}Indicizzamento dei file degli ON collegati}{42}{section.5.2}
\contentsline {subsection}{\numberline {5.2.1}addNewOnFileList}{43}{subsection.5.2.1}
\contentsline {subsection}{\numberline {5.2.2}searchFiles}{43}{subsection.5.2.2}
\contentsline {subsection}{\numberline {5.2.3}Altri metodi}{43}{subsection.5.2.3}
\contentsline {section}{\numberline {5.3}Smistamento delle query}{44}{section.5.3}
\contentsline {section}{\numberline {5.4}Il cuore di un Super Node}{45}{section.5.4}
\contentsline {subsection}{\numberline {5.4.1}Engine}{46}{subsection.5.4.1}
\contentsline {subsection}{\numberline {5.4.2}SN e RMI}{47}{subsection.5.4.2}
\contentsline {subsection}{\numberline {5.4.3}SN in ascolto su socket TCP}{49}{subsection.5.4.3}
\contentsline {chapter}{\numberline {6}Il package Util}{52}{chapter.6}
\contentsline {section}{\numberline {6.1}Descrittore di file custom}{52}{section.6.1}
\contentsline {section}{\numberline {6.2}Calcolo dell'md5}{53}{section.6.2}
\contentsline {section}{\numberline {6.3}Manipolazione delle stringhe}{54}{section.6.3}
\contentsline {subsubsection}{isInetAddress}{54}{section*.4}
\contentsline {subsubsection}{getRappresentableSize}{55}{section*.5}
\contentsline {section}{\numberline {6.4}Interazione con i file e con i metadati}{56}{section.6.4}
\contentsline {subsection}{\numberline {6.4.1}getFilesIntoDirectory}{56}{subsection.6.4.1}
\contentsline {subsection}{\numberline {6.4.2}transformFileToMKFile}{57}{subsection.6.4.2}
\contentsline {subsection}{\numberline {6.4.3}saveMySharedFiles}{57}{subsection.6.4.3}
\contentsline {subsection}{\numberline {6.4.4}loadMySharedFiles}{58}{subsection.6.4.4}
\contentsline {chapter}{\numberline {7}Il package di grafica}{59}{chapter.7}
\contentsline {section}{\numberline {7.1}Il campo di testo}{59}{section.7.1}
\contentsline {section}{\numberline {7.2}I bottoni}{59}{section.7.2}
\contentsline {section}{\numberline {7.3}Gestore degli eventi}{60}{section.7.3}
\contentsline {section}{\numberline {7.4}Le tabelle di Java}{60}{section.7.4}
\contentsline {chapter}{\numberline {8}Scelte di progetto e cenni di teoria}{62}{chapter.8}
\contentsline {section}{\numberline {8.1}Java Bean}{62}{section.8.1}
\contentsline {section}{\numberline {8.2}UML Logica}{62}{section.8.2}
\contentsline {section}{\numberline {8.3}Classe Wrapper per il socket}{63}{section.8.3}
\contentsline {section}{\numberline {8.4}Il protocollo TCP}{64}{section.8.4}
\contentsline {section}{\numberline {8.5}Il protocollo UDP}{64}{section.8.5}
\contentsline {section}{\numberline {8.6}Remote Method Invocation}{65}{section.8.6}
\contentsline {section}{\numberline {8.7}Utilizzo dei ThreadPool}{65}{section.8.7}
\contentsline {section}{\numberline {8.8}Come funzionano le query}{66}{section.8.8}
\contentsline {section}{\numberline {8.9}La classe di log}{68}{section.8.9}
\contentsline {chapter}{\numberline {A}Manuale d'uso}{69}{appendix.A}
\contentsline {section}{\numberline {A.1}Installazione}{69}{section.A.1}
\contentsline {section}{\numberline {A.2}Primo avvio}{69}{section.A.2}
\contentsline {section}{\numberline {A.3}Come funziona}{70}{section.A.3}
\contentsline {subsection}{\numberline {A.3.1}Cercare e scaricare un file}{71}{subsection.A.3.1}
\contentsline {subsection}{\numberline {A.3.2}Aggiungere un file nella lista dei file condivisi}{71}{subsection.A.3.2}
\contentsline {subsection}{\numberline {A.3.3}Controllare lo stato dei download}{71}{subsection.A.3.3}
\contentsline {subsection}{\numberline {A.3.4}NetMonitor}{72}{subsection.A.3.4}
\contentsline {subsection}{\numberline {A.3.5}Chiudere le schede}{72}{subsection.A.3.5}
\contentsline {section}{\numberline {A.4}Consigli degli autori per l' utilizzo}{72}{section.A.4}
